package net.gyapp.markim.core.reponse;

import org.jim.common.packets.Command;

/**
 * Auther:  winds
 * Email:   heardown@163.com
 * Date:    2018/7/18.
 * Desc:
 */

public class ChatResponse extends ImResponse {
    @Override
    public Command getCommand() {
        return Command.valueOf(command);
    }


    public int command;
    public int code;
    public DataBean data;
    public int isFailed; //是否失败  用于判断发送的消息是否失败


    public static class DataBean {
        public int chatType;
        public int cmd;
        public String content;
        public long createTime;
        public String from;
        public String group_id;
        public String id;
        public int msgType;
        public String to;

        @Override
        public String toString() {
            return "DataBean{" +
                    "chatType=" + chatType +
                    ", cmd=" + cmd +
                    ", content='" + content + '\'' +
                    ", createTime=" + createTime +
                    ", from='" + from + '\'' +
                    ", group_id='" + group_id + '\'' +
                    ", id='" + id + '\'' +
                    ", msgType=" + msgType +
                    ", to='" + to + '\'' +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "ChatResponse{" +
                "command=" + command +
                ", data=" + data +
                ", failed=" + isFailed +
                '}';
    }
}
